[SECTION .text]
[BITS 64]

global in_byte
in_byte:
    xor rax, rax
    mov rdx, rdi
    in al, dx
    ret

global out_byte
out_byte:
    mov rdx, rdi
    mov rax, rsi
    out dx, al
    ret

global in_word
in_word:
    xor rax, rax
    mov rdx, rdi
    in ax, dx
    ret

global out_word
out_word:
    mov rdx, rdi
    mov rax, rsi
    out dx, ax
    ret